import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '预约号',
    align: "center",
    dataIndex: 'code'
  },
  {
    title: '预约人',
    align: "center",
    dataIndex: 'memberName'
  },
  {
    title: '宝贝年龄',
    align: "center",
    dataIndex: 'memberAge'
  },
  {
    title: '宝贝性别',
    align: "center",
    dataIndex: 'memberSex'
  },
  {
    title: '联系方式',
    align: "center",
    dataIndex: 'memberPhone'
  },
  {
    title: '预约时间',
    align: "center",
    dataIndex: 'yyTime',
    customRender:({text}) =>{
      text = !text ? "" : (text.length > 10 ? text.substr(0,10) : text);
      return text;
    },
  },
  {
    title: '预约类型',
    align: "center",
    dataIndex: 'yyType_dictText'
  },
  {
    title: '服务老师',
    align: "center",
    dataIndex: 'employeeName'
  },
  {
    title: '理发',
    align: "center",
    dataIndex: 'yyLf_dictText'
  },
  {
    title: '备注',
    align: "center",
    dataIndex: 'remark'
  },
];

// 高级查询数据
export const superQuerySchema = {
  code: {title: '预约号',order: 0,view: 'text', type: 'string',},
  memberName: {title: '预约人',order: 2,view: 'link_table_field', type: 'string',},
  memberAge: {title: '宝贝年龄',order: 3,view: 'link_table_field', type: 'string',},
  memberSex: {title: '宝贝性别',order: 4,view: 'link_table_field', type: 'string',},
  memberPhone: {title: '联系方式',order: 5,view: 'link_table_field', type: 'string',},
  yyTime: {title: '预约时间',order: 6,view: 'date', type: 'string',},
  yyType: {title: '预约类型',order: 7,view: 'list', type: 'string',dictCode: 'le_appointment_type',},
  employeeName: {title: '服务老师',order: 9,view: 'link_table_field', type: 'string',},
  yyLf: {title: '理发',order: 10,view: 'radio', type: 'string',dictCode: 'le_is',},
  remark: {title: '备注',order: 11,view: 'textarea', type: 'string',},
};
